package com.ly.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ly.mapper.PromotionAdMapper;
import com.ly.pojo.PromotionAd;
import com.ly.service.PromotionAdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PromotionAdServiceImpl implements PromotionAdService {
    @Autowired
    private PromotionAdMapper promotionAdMapper;


    public List<PromotionAd> findAdBySpaceId(Integer spaceId) {
        QueryWrapper<PromotionAd> wrapper = new QueryWrapper<PromotionAd>();
        wrapper.eq("space_id",spaceId);
        List<PromotionAd> promotionAds = promotionAdMapper.selectList(wrapper);
        return promotionAds;
    }
}
